<?php
	@$id=$_POST['id'];
	@$idSelect = $_POST['idSelect'];
	if(isset($id))
	{
		include('libs/htdu_core.php');
		$exec_mysql = new execute_mysql_query();
		$result = $exec_mysql->execute("select id, name from sub_category where id_parent = $id", 0);
		echo '<select name="cid">';
		while($row = mysql_fetch_array($result))
		{
			if($row['id'] == $idSelect)
				echo '<option value="'.$row['id'].'" selected="selected">'.$row['name'].'</option>';
			else
				echo '<option value="'.$row['id'].'">'.$row['name'].'</option>';
		}
		echo '</select>';
	}
?>